class Pcate < ActiveRecord::Base
  has_many :products
  has_many :properties,:dependent=>:delete_all
  acts_as_tree :order=>"sort_order desc",:counter_cache => 'children_count'

  def self.parent_pcates
    Pcate.find(:all,:conditions=>["parent_id is null"])
  end
end
